#pragma once
#include "Entity.h"
#include <vector>

class Planets;
class BossPlanets;

class Zone : public Entity
{
public:
	Zone() = default;
	~Zone() = default;

	//zones
	enum ZoneType { ZONE1, ZONE2, ZONE3, ZONE4, ZONE5 };

	//Accessors
	std::vector<Planets*>& GetPlanets() { return planets; }
	std::vector<Planets*>& GetAsteroids()  { return asteroids; }
	int GetMinPlanetRad() const { return minPlanetRad; }
	int GetMaxPlanetRad() const { return maxPlanetRad; }
	int GetNumPlanets() const { return numPlanets; }
	int GetEnemyChance() const { return enemySpawnChance; }
	int GetLightChance() const { return lightSpawnChance; }
	BossPlanets* GetZoneBoss() const { return zoneBoss; }
	ZoneType GetZoneType() const { return zType; }

	//Mutators
	void SetMinPlanetRad(int n) { minPlanetRad = n; }
	void SetMaxPlanetRad(int n) { maxPlanetRad = n; }
	void SetNumPlanets(int nP) { numPlanets = nP; }
	void SetEnemyChance(int e) { enemySpawnChance = e; }
	void SetLightChance(int l) { lightSpawnChance = l; }
	void SetZoneType(ZoneType z) { zType = z; }
	void SetZoneBoss(BossPlanets*b){ zoneBoss = b; }
	
	void SetIsFirst(bool b){ isFirst = b; }

	//interface
	void PopulatePlanets();
	void AddAsteroid(Planets*);
	void ReleasePlanets();

private:
	int minPlanetRad = 0;
	int maxPlanetRad = 0;
	int numPlanets = 0;
	int enemySpawnChance = 0;
	int lightSpawnChance = 0;

	std::vector<Planets*> planets;
	std::vector<Planets*> asteroids;
	BossPlanets* zoneBoss = nullptr;
	bool isFirst = false;

	ZoneType zType;
};